/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jili.ubert.clientapi.until;

import com.jili.ubert.clientapi.MsgEntity;
import com.jili.ubert.code.server2client.MsgResult;
import java.io.IOException;

/**
 *
 * @author ChengJiLi
 */
public class AnswerMsgResult extends AbstractWorker {

    @Override
    public void Onhandler(MsgEntity msg) {
        MsgResult data = new MsgResult();
        try {
            data = data.DeCode(msg.getData());
            getAnswerHandler().OnAnswer(data);
        } catch (IOException ex) {
            data.setReturnID(100);
            data.setSuccess(false);
            data.setRemark(ex.getMessage());
            getAnswerHandler().OnAnswer(data);
        }
    }

}
